<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMenusTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('menus', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('pid')->commit('父ID');
            $table->string('name')->commit('菜单名');
            $table->string('permission_name')->commit('对应权限组名');
            $table->smallInteger('sort')->default(0)->commit('排序');
            $table->smallInteger('is_menu')->default(0)->commit('是否是菜单0不是1是');
            $table->tinyInteger('status')->commit('状态0_未处理,1_已处理');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('menus');
    }
}
